const express = require('express');
const config = require('./webpack.config.js');
const webpack = require('webpack');
const webpackDevMiddleware = require('webpack-dev-middleware');

const app = express();
const compiler = webpack(config);
app.use(webpackDevMiddleware(compiler, {
    publicPath: config.output.publicPath
}));
// app.use(webpackDevMiddleware(compiler));
app.listen(3032, function() {
    console.log('Example app listening on the port 3032');
})
